
<div style="float: left;">
<div class="ui-corner-top side_menu" style="width: 100%;">Enrollees</div>
<div style="border:1px  solid #286bcc;">
	<div>&nbsp;</div>
	<div>
	<?if(isset($system_message))echo $system_message;?>
	<?php 
		$formAttrib = array('id' => 'searc_enrollee', 'class' => 'registrar-form', 'method' => 'GET');
		
		$lastNameAttrib = array('name' => 'lastname', 'id' => 'lastname');
		$firstNameAttrib = array('name' => 'firstname', 'id' => 'firstname');
		$idnoAttrib = array('name' => 'idno', 'id' => 'idno');
		echo form_open('evaluation/search', $formAttrib);
		
	?>
    
    <div class="input-block">
    <?php
		echo form_label('Last Name  :', 'lastname');
		echo form_input($lastNameAttrib);	
	?>
    </div>
    
    <div class="input-block">
    <?php
		echo form_label('First Name  :', 'firstname');
		echo form_input($firstNameAttrib);	
	?>
    </div>
    
    <div class="input-block">
    <?php
		echo form_label('IDNO :', 'idno');
		echo form_input($idnoAttrib);	
	?>
    </div>
    
 

    
	
   
    <div class="input-block" style="clear:both;">
   		<?php echo form_submit('submit', 'Submit'); ?>
	</div>

	</div>
	<div class="clearfloat"></div>
<?if(isset($no_student)):?>
<table>
		
			<thead class="tabular-head">
			<tr>
            	<th>IDNO</th>
				<th>Student Name</th>
				<th>Grade Level</th>
				<th>Section Assignment</th>
              
			</tr>
			</thead>
			<tbody>
            	<tr><td>No student found</td></tr>
            </tbody>
            </table>
<?endif;?>
<?if(!empty($enrollees)):?>
<table>
		
			<thead class="tabular-head">
			<tr>
            	<th>IDNO</th>
				<th>Student Name</th>
				<th>Grade Level</th>
				<th>Section Assignment</th>
              
			</tr>
			</thead>
			<tbody class="tabular">
            <?php 
			$query_string = '';
			foreach($q_string as $key => $qq){
            	$query_string =	$query_string.$key.'='.$qq.'&';
            }

			?>
			<?foreach($enrollees as $student):?>
            	
				<tr>
                	<td><?=$student->idno?></td>
					<td><?=$student->lastname.', '.$student->firstname.' '.substr($student->middlename, 0, 1);?></td>
					<td><?=strtoupper($student->level_code).' - '.$student->level_desc;?></td>
                    <td><?=$student->section_name;?></td>
					<td class="action">
                    	<a href="<?php echo site_url('evaluation/enrollee/'.$student->e_profile_id)?>">View Profile</a>
                    	<a href="<?php echo site_url('evaluation/destroy_enrollment/'.$student->e_id).'/?'.substr_replace($query_string ,"",-1);?>">Destroy Enrollment</a>
                        <a href="<?php echo site_url('evaluation/destroy_account/'.$student->user_id).'/'.$student->e_profile_id.'/?'.substr_replace($query_string ,"",-1);?>">Destroy Account</a>
                    </td>
				</tr>
			
			<?endforeach;?>
			</tbody>
		
		
	</table>
   <?endif;?>
<div>&nbsp;</div>
</div>
</div>